package tienmanh.gs.goldminer.util;

import tienmanh.gs.goldminer.manager.ResourcesManager;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;


public class Gold {

	public static String filename = "coint";
	public static SharedPreferences sp;
	public static Editor edit;
	
	public static void init(){
		sp = ResourcesManager.getInstance().activity.getSharedPreferences(filename,0);
		edit = sp.edit();
	}
	public static void writeGoldSP(long value){
	    edit.putLong("gold", value);
	    edit.commit();
	}
	public static long readEGoldSP(){
	    return sp.getLong("gold", 1200);
	}
}
